<template>
  <div>
    <van-nav-bar :title="title">
      <template #left>
        <van-icon
          name="arrow-left"
          color="#999"
          @click="goBack"
        />
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  name: 'NavBar',
  props: {
    title: {
      type: String,
      default: '',
    }
  },
  methods: {
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style>
</style>
